<?php /* Smarty version Smarty-3.1.1, created on 2014-05-09 03:57:25
         compiled from "d:\wamp\www\vote\templates\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:26259536be1a522d1b2-57962289%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '942bbc8967e92924558901a3724ecd2fc707ddee' => 
    array (
      0 => 'd:\\wamp\\www\\vote\\templates\\index.tpl',
      1 => 1399574961,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '26259536be1a522d1b2-57962289',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'showIndex' => 0,
    'polls' => 0,
    'isLogin' => 0,
    'loginFailed' => 0,
    'choice' => 0,
    'num' => 0,
    'isPolled' => 0,
    'showResult' => 0,
    'numStu' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.1',
  'unifunc' => 'content_536be1a535dcf',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_536be1a535dcf')) {function content_536be1a535dcf($_smarty_tpl) {?>﻿<?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<div id="content">
<?php if ($_smarty_tpl->tpl_vars['showIndex']->value==true){?>
<div id="head1" style="    font-size: 20px;    text-align: left;    padding: 20px;">投票已结束</div>
<?php }?> 


<?php if ($_smarty_tpl->tpl_vars['polls']->value==true){?>
<table border="0" cellpadding="0" cellspacing="0" class="main" width="100%">
	<tbody>
		<tr>
			<td height="77" width="30"></td>
			<td class="ttl2_1">
			<p class="att" style="font-size:14px">1、登陆才可投票,仅可投一次，一次可最多选择10名老师。 <br />
			2、北京科技大学第十五届我爱我师投票公共课部分，仅限在校10级本科生 <br />
			3、老师排序为拼音顺序。<br />
			</p>
			</td>
			<td width="16"></td>
		</tr>
		<tr>
			<td></td>
			<td valign="top">
			<hr />
			<center><br />
			<br />
			<br />


				
	<?php if ($_smarty_tpl->tpl_vars['isLogin']->value==false){?> 
			<input type="hidden" value="1" name="login"/>
			<?php if ($_smarty_tpl->tpl_vars['loginFailed']->value==true){?>
				<p>请先登陆</p>
			<?php }?>
			<form id="form1" name="form1" method="post" action="index.php?p=poll">
			<table border="0" cellpadding="0">
				<tr>
					<th><label for="id_username">学号:</label></th>
					<td><input style="height: 25px; FONT-SIZE: 20px" name="username" maxlength="30" type="text" id="id_username" size="20" /></td>
				</tr>
				
				<tr>
					<th><label for="id_sname">姓名:</label></th>
					<td><input type="text" style="height:25px;FONT-SIZE:20px" id="id_sname" name="sname" size="20"/></td>
				</tr>
			
				<tr>
					<th><label for="id_code">验证码(不区分大小写):</label></th>
					<td><input style="height:25px;FONT-SIZE:20px;width:46px" id="id_code" maxlength="30" 
					type="text" name="code" size="20" />
					<img src='getcode.php' alt='' /></td>
				</tr>	
				
    		</table>
    				
    	<p><input type="submit" class="submit"  style="width:100px;height:30px;font-size:14px" value="登陆" /></p>
		
		</form>
		
			
		
		
    <?php }?>	
    <?php if ($_smarty_tpl->tpl_vars['isLogin']->value==true){?>
    				<input type="hidden" value="1" name="isPoll"/>
					<form id="form2" name="form2" method="post" action="vote.php">
    				<table border="0" cellpadding="10" cellspacing="0" >
					
						<?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['name'] = 'loop';
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['choice']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total']);
?>
							<?php $_smarty_tpl->tpl_vars["num"] = new Smarty_variable($_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['id'], null, 0);?>
							<?php if (($_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']%3==0)&&($_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']!=0)){?>
    					    	</tr>
          						<tr><td colspan="9" height="14"></td></tr>
         						<tr>
							<?php }?>
							<?php if ($_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']==0){?>
								<tr>
							<?php }?>
								<td class="md" width="230">
									<div class="text_box" style="height:500px;overflow-y:hidden; text-align:center;">
									<a href="http://wiki.ibeike.com/index.php/<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['name'];?>
" target="_blank"><img src="<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['imglink'];?>
" style="height:160px;width:118px" /></a>
										<h3><span class="r">得票：<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['vote'];?>
</span><?php if ($_smarty_tpl->tpl_vars['isPolled']->value[$_smarty_tpl->tpl_vars['num']->value]==0){?><span class="l"><input type="checkbox" name="checked[]" value="<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['_id'];?>
"/></span><?php }?><span class="l"><?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['name'];?>
</span></h3>
										<div class="clear dot_line"></div>
										<p class="comments"><?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['comment'];?>
</p>
										<p class="words"><?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['word'];?>
</p>

<ul id="teach_<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['_id'];?>
">
</ul>


<p class="send"	<a class="send" pid='<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['_id'];?>
' href="####"><img alt="" src="static/images/sendwell.png" style="border:0px;"/></a>	</p>						
									</div>
            					</td>
            					<td width="25"></td>
						<?php endfor; endif; ?>
    							<td width="14"></td>
          					</tr>
          						<tr><td colspan="9" height="14">
          						</td></tr>
        			</tbody></table>
        			<p><input type="submit" class="submit" style="width:100px;height:30px;font-size:14px" value="提交" /></p>
    	<?php }?>
				</form>
			</center>
		</table>

<?php }?>

<?php if ($_smarty_tpl->tpl_vars['showResult']->value==true){?>
<table border="0" cellpadding="0" cellspacing="0" class="main"
	width="100%">
	<tbody>
		<tr>
			<td height="77" width="30"></td>
			<td class="ttl2_1">
			<p class="att" style="font-size:14px">1、登陆才可投票,仅可投一次，一次可最多选择10名老师。 <br />
			2、北京科技大学第十五届我爱我师投票公共课部分，仅限在校10级本科生 <br />
			3、老师排序为拼音顺序。 <br /></p>
			</td>
			<td width="16"></td>
		</tr>
		<tr>
			<td></td>
			<td valign="top">
			<hr />
			<center><br />
			<center><h1>总参与投票人数：<?php echo $_smarty_tpl->tpl_vars['numStu']->value;?>
</h1></center>
			<br />
			<br />


    				<table border="0" cellpadding="10" cellspacing="0"><tbody>
						<?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['name'] = 'loop';
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['choice']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['loop']['total']);
?>
							<?php if (($_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']%3==0)&&($_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']!=0)){?>
    					    	</tr>
          						<tr><td colspan="9" height="14"></td></tr>
         						<tr>
							<?php }?>
							<?php if ($_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']==0){?>
								<tr>
							<?php }?>
								<td class = "md" width="230">
									<div class="text_box" style="height:500px;overflow-y:hidden;  text-align:center;">
									<a href="http://wiki.ibeike.com/index.php/<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['name'];?>
" target="_blank"><img src="<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['imglink'];?>
" /></a>
										<h3><span class="r">得票：<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['vote'];?>
</span><span class="l"><?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['name'];?>
</span></h3>
										<div class="clear dot_line"></div>
										<p class="comments"><?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['comment'];?>
</p>
										<p class="words"><?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['word'];?>
</p>

<ul id="teach_<?php echo $_smarty_tpl->tpl_vars['choice']->value[$_smarty_tpl->getVariable('smarty')->value['section']['loop']['index']]['_id'];?>
">
</ul>


									</div>
            					</td>
            					<td width="25"></td>
						<?php endfor; endif; ?>
    							<td width="14"></td>
          					</tr>
          						<tr><td colspan="9" height="14"></td></tr>
        			</tbody></table>
			</center>
		</table>


<?php }?>

</div>
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<?php }} ?>